﻿//--权限--用户信息
const userInfoCacheKey = "userInfoCacheKey_";
const userPermissionCacheKey = "userPermissionCacheKey_";
//const HttpImgApiUrl = "https://localhost:5001/api/File/Attachment?pathUrl=";
var FileHttpApiUrl = "";//程序配置

function setUserInfo(value) {
    SetCache(userInfoCacheKey, value)
}
function setPermissionKeys(value) {
    SetCache(userPermissionCacheKey, value)
}
///是否有权限
function IsPermission(key) {
    var temp = getPermissionKeys();
    if (IsEmpty(temp)) return false;
    if (temp.indexOf(key) > -1) {
        return true;
    } else {
        return false;
    }
}
function getUserInfo() {
    return GetCache(userInfoCacheKey)
}
function getPermissionKeys() {
   return GetCache(userPermissionCacheKey)
}
function CleanUserInfo() {
    setUserInfo()
    setPermissionKeys()
}